<template>
	 <scroll-view style="height: 100vh;" scroll-y="true">
	<uv-status-bar style="background-color: red;"></uv-status-bar>
	<view class="content">
		
		<view style="width: 100%;">
		<view class="img_clees" style="margin-bottom: 30rpx;">
	
		<image style="width:400rpx; height:60rpx" src="/static/hualu.png"></image>
	</view>

	<view  class="swiper_hualu">
		<uv-swiper 
		   height="350rpx"
			:list="list" 
			previousMargin="30" 
			nextMargin="30" 
			circular 
			:autoplay="true" 
			radius="5" 
			bgColor="transparent">
		</uv-swiper>
	</view>

		<view @click="gotoNEWpage" class="swiper_hualu1">
        <uv-icon color="white" size="55rpx" name="empty-data"></uv-icon>
		&nbsp;
		进入焊缝管理
		</view>
		
		<view @click="scanClick" class="swiper_hualu2">
			<uv-icon color="white" size="55rpx" name="scan"></uv-icon>
			&nbsp;
			扫码查询焊缝
</view>
		
<view style="margin-bottom: 40rpx">
	<uv-notice-bar bgColor="#fff" color="#9acafc" :text="[
		'华陆微信小程序，焊口管理系统正式上线。当前系统版本为v.0.0.1',
		'在此系统中，你可以使用这个系统扫码查询你想查询的内容。'
	]" direction="column"></uv-notice-bar>
</view>

<view style="margin: -20rpx;">

	  <view style="padding: 20rpx;font-size: 28rpx;font-weight: bolder;background: white;margin-top: 30rpx;" class="title_news">
        项目公告
	  </view>
	
		<spring-image-text :dataList="dataList_image" imageShape="square"></spring-image-text>
	
	

</view>
		
		
	</view>


		

  <!-- <div style='position:fixed;width:100%;height:25vh;bottom:0;left:0; '>
   <div class="mask"></div>

  
  </div> -->
	
	</view>
</scroll-view>

</template>

<script setup>
import { ref } from "vue";
import {login,getWeldByQrcode} from '../../https/api/index'
import { onShow ,onReachBottom,onLoad} from "@dcloudio/uni-app";



let scanClick = () => {
  uni.scanCode({
	success:  async(res)=> {
		console.log('条码类型：' + res.scanType);
		console.log('条码内容：' + res.result);
    if(res.scanType == 'QR_CODE'){
       let res2 = await getWeldByQrcode({qrcode: res.result})
	   
	   uni.setStorageSync('searchInfo',JSON.stringify(res2.data))
	   uni.navigateTo({
		url:'/pages/craterPage'
	   })
    }
	}
});
}

let dataList_image = ref([
{
                    coverImage: 'http://www.chinahualueng.com/storage/posts/March2024/jvWz6D44vGMqIduihG2L.jpg',
                    title: '炼化一体化项目的裁决决定',
                    desc: '广东石化炼化一体化项目的裁决决定广东石化炼化一体化项目的裁决决定',
                    createTime: '2024-05-01 10:00'
                },
                {
                    coverImage: 'http://www.chinahualueng.com/storage/posts/January2024/6IF6FzHYlbt3x8V3wofL.jpg',
                    title: '广西华谊75万吨/年丙烯及下游深加工项目丁醇装置-数字化交付',
                    desc: '丙烯及下游深加工项目丁醇装置-数字化交付丙烯及下游深加工项目丁醇装置-数字化交付丙烯及下游深加工项目丁醇装置-数字化交付',
                    createTime: '2024-05-01 10:00'
                },
                {
                    coverImage: 'http://www.chinahualueng.com/storage/posts/December2023/0cBpdE4URADYj46ttDOR.jpg',
                    title: '靖远煤电清洁高效气化气综合利用（搬迁改造）项目一期工程净化合',
                    desc: '气化气综合利用（搬气化气综合利用（搬气化气综合利用（搬气化气综合利用（搬',
                    createTime: '2024-05-01 10:00'
                }
])

let list = ref([
	'http://www.chinahualueng.com/storage/categories/July2022/lDe3fo6RQiDugjVquXmP.jpg',
					'http://www.chinahualueng.com/storage/banners/October2022/Fk4mSTN7WPVpnYeroAdR.jpg',
					'http://www.chinahualueng.com/storage/categories/July2022/1vAKiNPpc9Tnvnh6rMfi.jpg',
					'http://www.chinahualueng.com/storage/categories/October2022/sdJ1z91L67DHWnC1x0LU.jpg',


])

onLoad((option)=>{
	
})

let model1 = ref({
	userInfo:{
		name:'',
		password:''
	}
})

let satoken = ref('')
let gotoNEWpage =async () => {
	uni.navigateTo({
		url: '/pages/majorPage'
	})
}


let gotoNEWpage2 =async () => {
	uni.navigateTo({
		url: '/pages/majorPage'
	})
	
}


onReachBottom(()=>{

	
	
})




onShow(()=>{
	let token = uni.getStorageSync('satoken')
if(token){
	satoken.value = token
}else{
	satoken.value = ''
}
	
	
	
})



</script>
<style scoped lang="scss">
.mask{
	opacity: .9;
	-webkit-mask-box-image: url();
	// background: url('http://www.chinahualueng.com/storage/banners/October2022/AHGfKnkrBIMUJrkkeWkV.jpg');
	background-size: 100% 100%;
	mask-image: linear-gradient(transparent, #000);
  width: 100%;
  height: 100%;
//   mask-image:url('http://www.chinahualueng.com/storage/banners/October2022/Fk4mSTN7WPVpnYeroAdR.jpg');
 
 

}
.img_clees{
	display: flex;
	align-items: center;
	
	border-radius: 20rpx;

}
.content{
	background-image: linear-gradient(180deg, #9acafc 0%, #f2f2f2 30%);
	// background: url('https://ts1.cn.mm.bing.net/th/id/R-C.fbd97d38e1c5d31e68fe441aa4e8af39?rik=xBQB7DWASyiY3w&riu=http%3a%2f%2fftsucai.com%2fupload%2f201909%2fbg2.jpg&ehk=OSbfcCu0AxFGtXpdC4Q8WmmvlZMayPm2pQxVlUAzEvs%3d&risl=&pid=ImgRaw&r=0');
}
.title_hualu2{
	
	text-align: center;
	margin-top: 20rpx;
	font-size: 28rpx;
	font-weight: bolder;
}
.title_hualu{

	margin-bottom: 20rpx;
	color: #1296db;
	text-align: center;
	margin-top: 20rpx;
	font-size: 37rpx;
	font-weight: bolder;
}
.list_goods{
	.prive_title{
		margin-top: 8rpx;
		padding: 0 15rpx;
	}
	.shopmall{
		margin-top: 10rpx;
		display: flex;
  color: #8D8D8D;
  font-size: 22rpx;
  margin-bottom: 20rpx;
  padding: 0 15rpx;
	}
	.margin_top_bottom{
		padding: 0 15rpx;
		margin-bottom: 8rpx;
		margin-top: 6rpx;
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		.box1{
			margin-right: 20rpx;
			border: 1px solid #FF1C23;
			width: 85rpx;
			height: 30rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			color: #DF0024;
			font-size: 18rpx;
		}
.box2{
	display: flex;
	align-items: center;
	margin-right: 20rpx;
}
	  .quan{
		padding: 1rpx;
		border: 1px solid #FF1C23;
		border-right: 1px dashed #FF1C23;
		color: #DF0024;
		font-size: 18rpx;
	  }
	  .quan2{
		padding: 1rpx;
		border: 1px solid #FF1C23;
		border-left: none;
		color: #DF0024;
		font-size: 18rpx;
	  }

	

	}
	.price_red{
		color: #FF1C23;
		font-size: 31rpx;
	}
	.price_scale{
		margin-left: 20rpx;
		color:#8D8D8D;
		font-size:22rpx;
	}
	margin-top: 20rpx;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	.item{
		margin-bottom: 20rpx;
		width: 49%;
     border-radius: 15rpx;
	 background: white;
	 .item_title{
		font-size: 25rpx;
		padding: 0 15rpx;
		margin-top: 15rpx;
		
		align-items: center;
	}
	.span_p{
		overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;  // 控制多行的行数
    -webkit-box-orient: vertical;


	}
	.nianhuo{
		display: inline-block;;
		border-radius: 10rpx;
		vertical-align: top;
		font-size: 20rpx;
		background-image: linear-gradient(135deg, rgb(246, 175, 175), red);
		width: 54rpx;
		height: 28rpx;
		text-align: center;
		color: white;
		font-weight: bolder;
		line-height: 28rpx;
       display: inline-block;
	}
	}
	
}
.content_today{
	margin-top: 20rpx;
	// display: flex;
	// align-items: center;
	// justify-content: space-between;
	.item{
		margin-right: 30rpx;
		.text{
			overflow: hidden;
    /* 超过了就显示省略号 */
    text-overflow: ellipsis;
    
    /* webkit内核的浏览器 */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;

			margin-top: 10rpx;
			font-size: 24rpx;

		}
		.price{
			margin-top: 5rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			color: #FF1C23;
			font-size: 
              30rpx;
		}
	}
}
.today{
	border-radius: 15rpx;
	margin-top: 20rpx;
	padding: 20rpx;
	background: white;
	.header{
	.more{
		font-size: 
		24rpx;
		display: flex;
		align-items: center;
		}
		position: relative;
		display: flex;
		align-items: center;
		.sp_fs{
			font-size: 30rpx;
			color: #000000;
			margin-left: 10rpx;
		}
		
	}
}
.view_clss view:nth-of-type(2){
	margin-bottom: 10rpx;
}
.banner{
	display: flex;
	align-items: center;
	justify-content: space-between;
	.left{
		border-radius: 15rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 20rpx;
		background-image: linear-gradient(135deg, white, #ffeed6);
		.p_fon11{
			font-size: 31rpx;
    font-weight: bolder;
	color: #CA9440;
		}
		.p_fon12{
			margin-top: 12rpx;
			margin-bottom: 18rpx;
			font-size: 22rpx;
			color: #7C7A77;
		}
		.p_fon113{
			font-size: 31rpx;
    font-weight: bolder;
	color: #D73356;
		}
	}
	.red{
		background-image: linear-gradient(135deg, white, #fee6e5);
	}
}
::v-deep .placeholderClassss{
 color: #AAABAD;
 font-size: 25rpx;
}
.header_nav{
	z-index: 20;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	padding: 20rpx;
	background: white;;
}
	.content{
		padding: 20rpx;
		height: 100vh;
		display: flex;
		// align-items: center;
		// justify-content: center;
	}
	.swiper_hualu1{
		margin-top: 30rpx;
		color: white;
		background-image: linear-gradient(15deg, #9bcbfc 0%, #5577ff 100%);
		border-radius: 20rpx;
		padding: 25rpx;
		font-size: 30rpx;
		display: flex;
		font-weight: bold;
		align-items: center;
		justify-content: center;
		margin-bottom: 30rpx;
		background: #5577ff;
	}

	.swiper_hualu2{
		margin-top: 30rpx;
		color: white;
		background-image: linear-gradient(-225deg, #35b3ff 0%, #6B8DD6 48%, );
		border-radius: 20rpx;
		padding: 25rpx;
		font-size: 30rpx;
		display: flex;
		font-weight: bold;
		align-items: center;
		justify-content: center;
		margin-bottom: 30rpx;
		background: #35b3ff;
	}

	.title_news{
		padding-left: 40rpx !important;
		position: relative;
		&::after{
			position: absolute;
			content: ' ';
			width: 10rpx;
			height: 40%;
			left: 20rpx;
			top:50%;
			transform: translateY(-50%);
		  background: rgb(105, 185, 247);
		}
	}
</style>